import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR } = app.Sequelize;
    const model = app.model.define('Accusation', {
        accusation_id: { type: CHAR(32), primaryKey: true },//主键
        user_id: CHAR(32),//举报人id
        report_user_id: CHAR(32),//被举报人id
        accusation_type: CHAR(1),//举报人类型（1：用户，2：解忧）
        accusation_reason: STRING(100),//举报原因
        accusation_picture: STRING(255),//举报证图
        accusation_status: CHAR(1),//状态（1：已处理，2：待审核，3：忽略，4：禁言，5：封号）
        created_by: STRING(32),
        updated_by: STRING(32),
        is_delete: CHAR(1),
    }, { tableName: 't_accusation' });
    return model;
};

export class Accusation {
    accusation_id: string;
    user_id: string;
    report_user_id: string;
    accusation_type: string;
    accusation_reason: string;
    accusation_picture: string;
    accusation_status: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}
